package mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.ResultSetExtractor;

import bean.News;

public class newsResultSetExtractor implements ResultSetExtractor{
	@Override
	  public Object extractData(ResultSet rs) throws SQLException {
	    News news = new News();
	    news.setTitle(rs.getString(1));
	    System.out.println(rs.getString(1));
	    news.setContent(rs.getString(2));
	    System.out.println(rs.getString(2));

	    return news;
	  }

	
}
